package com.meatball.game.data

import com.alibaba.fastjson2.annotation.JSONField

/**
 * TODO 聊天数据类
 *
 * @property playerId 玩家ID
 * @property timestamp 时间戳
 * @property role 角色
 * @property content 内容
 */
data class ChatParams(
        @get:JSONField(name = "player_id")
        @set:JSONField(name = "player_id")
        var playerId: String,
        val timestamp: Long = System.currentTimeMillis(),
        val role: String = "user",
        val content: String
)

/**
 * TODO AI返回信息
 *
 * @property content 内容
 * @property playerId 玩家ID
 * @property role 角色
 * @property timestamp 时间戳
 */
data class ChatResult (
        var content: String = "",
        @get:JSONField(name = "player_id")
        @set:JSONField(name = "player_id")
        var playerId: String = "",
        var role: String = "",
        var timestamp: Long = 0
)

/**
 * TODO 聊天响应体
 *
 * @property code 状态码
 * @property msg 消息
 * @property results 消息列表
 */
data class ChatResponse(
        var code: Int = 0,
        var msg: String = "",
        val results: MutableList<ChatResult> = mutableListOf()
)
